﻿using SHRIS.MIS.Business.SystemManage;
using SHRIS.MIS.IService.SystemManage;
using SHRIS.MIS.Service.Cache;
using SHRIS.MIS.Service.SystemManage;

namespace Microsoft.Extensions.DependencyInjection
{
    public static partial class CustomService
    {
        public static IServiceCollection AddMyCustomServices(this IServiceCollection services)
        {
            services.AddSingleton<IUserService, UserService>();
            services.AddSingleton<IUserBelongService, UserBelongService>();
            services.AddSingleton<IDepartmentService, DepartmentService>();
            services.AddSingleton<IRoleService, RoleService>();
            services.AddSingleton<IPositionService, PositionService>();
            services.AddSingleton<IMenuService, MenuService>();
            services.AddSingleton<ILogOperateService, LogOperateService>();
            services.AddSingleton<ILogLoginService, LogLoginService>();
            services.AddSingleton<MenuAuthorizeService>();
            services.AddSingleton<MenuAuthorizeCache>();
            services.AddSingleton<MenuCache>();
            services.AddSingleton<DepartmentBLL>();
            services.AddSingleton<UserBLL>();
            services.AddSingleton<RoleBLL>();
            services.AddSingleton<PositionBLL>();
            services.AddSingleton<MenuBLL>();
            services.AddSingleton<LogLoginBLL>();
            services.AddSingleton<MenuAuthorizeBLL>();
            
            services.AddSingleton<IDataDictService, DataDictService>();
            services.AddSingleton<IDataDictDetailService, DataDictDetailService>();
            services.AddSingleton<DataDictCache>();
            services.AddSingleton<DataDictDetailCache>();
            services.AddSingleton<DataDictDetailBLL>();
            services.AddSingleton<DataDictBLL>();

            return services;
        }

        public static IServiceCollection AddNewCustomServices(this IServiceCollection ser)
        {
            return ser;
        }
    }
}
